package routers

import (
	"beegoProject03/controllers"
	"beegoProject03/controllers/login"
	"beegoProject03/controllers/user"
	"github.com/astaxie/beego"
)

func init() {
	/*
		不需要登录即可请求到url
	*/
	// 登录用户名密码提交
	beego.Router("/", &login.LoginController{})
	// ChangeCaptcha
	beego.Router("/change_captcha", &login.LoginController{}, "get:ChangeCaptcha")

	/*
		必须登录即可请求到url
	*/
	// 首页
	beego.Router("/main/index", &controllers.HomeController{})
	// 欢迎页
	beego.Router("/main/welcome", &controllers.HomeController{}, "get:Welcome")

	// user用户模块
	beego.Router("/main/user", &user.UserController{})

}
